import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { BasicDataComponent } from './basicdata.component';
import { RoleComponent } from './role/role.component';
import { EmploysComponent } from './employs/employs.component';
import { AddEmploysComponent } from './employs/employs/add-employs/add-employs.component';
import { EditEmploysComponent } from './employs/employs/edit-employs/edit-employs.component';
import { StorehouseComponent } from './storehouse/storehouse.component';
import { PositionComponent } from './position/position/position.component';
import { MaterialComponent } from './material/material.component';
import { AddMaterialComponent } from './material/material/add-material/add-material.component';
import { EditMaterialComponent } from './material/material/edit-material/edit-material.component';
import { WorkShopComponent } from './work-shop/work-shop.component';
import { CustomerComponent } from './customer/customer.component';
import { SettlementMethodComponent } from './settlement-method/settlement-method.component';
import { CurrencyComponent } from './currency/currency.component';
import { AddCustomerComponent } from './customer/add-customer/add-customer.component';
import { CustomerDiscountRateComponent } from './customer-discount-rate/customer-discount-rate.component';
import { EditCustomerComponent } from './customer/edit-customer/edit-customer.component';
import { SupplierComponent } from './supplier/supplier.component';
import { SupplierAddComponent } from './supplier/supplier-add/supplier-add.component';
import { SupplierEditComponent } from './supplier/supplier-edit/supplier-edit.component';
import { SupplierPriceComponent } from './supplier-price/supplier-price.component';
import { SupplierPriceAddComponent } from './supplier-price/supplier-price-add/supplier-price-add.component';
import { SupplierPriceEditComponent } from './supplier-price/supplier-price-edit/supplier-price-edit.component';
import { CanActivateGuard } from 'src/app/@core/services/can-load-service.guard';
import { UserCenterComponent } from './user-center/user-center.component';
import { WuliuComponent } from './wuliu/wuliu.component';

const routes: Routes = [
  {
    path:'',
    component:BasicDataComponent,
    children:[
    ]
  },
  {
    path:'role',
    component:RoleComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'employs',
    component:EmploysComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'add-employs',
    component:AddEmploysComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'edit-employs/:id',
    component:EditEmploysComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'storehouse',
    component:StorehouseComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'position',
    component:PositionComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'material',
    component:MaterialComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'material/add-material',
    component:AddMaterialComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'material/edit-material/:id',
    component:EditMaterialComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'work-shop',
    component:WorkShopComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'customer',
    component:CustomerComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'customer-discountRate',
    component:CustomerDiscountRateComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'customer/add',
    component:AddCustomerComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'customer/edit/:id',
    component:EditCustomerComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'settlement-method',
    component:SettlementMethodComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'currency',
    component:CurrencyComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'supplier',
    component:SupplierComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'supplier/supplier-add',
    component:SupplierAddComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'supplier/supplier-edit/:id',
    component:SupplierEditComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'supplier-price',
    component:SupplierPriceComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'supplier-price/supplier-price-add',
    component:SupplierPriceAddComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:'supplier-price/supplier-price-edit/:id',
    component:SupplierPriceEditComponent,
    canActivate: [CanActivateGuard]
  },
  {
    path:"userCenter/:id",
    component:UserCenterComponent,
  },
  {
    path:"userCenter/:id/:type",
    component:UserCenterComponent,
  },
  {
    path:"wuliuguanli",
    component:WuliuComponent,
  }
];
@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class BasicDataRoutingModule { }
